package com.wj.service.impl;

import java.util.List;

import com.wj.bean.Car;
import com.wj.bean.OrderList;
import com.wj.bean.Orders;
import com.wj.bean.Room;
import com.wj.bean.User;
import com.wj.dao.DAO;
import com.wj.dao.impl.DAOImpl;
import com.wj.service.UserService;

public class UserServiceImpl implements UserService {
	private static DAO dao=new DAOImpl();
	
	@Override
	public List<User> queryUser() {
		return dao.queryUser();
	}

	@Override
	public void addUser(User u) {
		dao.addUser(u);
	}

	@Override
	public List<User> listAllSrarch(String search, int offset, int limit) {
		return dao.listAllSearch(search,offset,limit);
	}

	@Override
	public int getTotal() {
		return dao.getTotal();
	}

	@Override
	public User queryOneUser(String name, String pass) {
		// TODO Auto-generated method stub
		return dao.queryOneUser(name,pass);
	}

	@Override
	public boolean removeUserById(int u_id) {
		// TODO Auto-generated method stub
		return dao.removeUserById(u_id);
	}

	@Override
	public int removeAllUser(List<String> list) {
		// TODO Auto-generated method stub
		return dao.removeAllUser(list);
	}

	@Override
	public List<Room> listAllRoom(String search, int offset, int limit) {
		// TODO Auto-generated method stub
		return dao.listAllRoom(search,offset,limit);
	}

	@Override
	public int getRoomTotal() {
		// TODO Auto-generated method stub
		return dao.getRoomTotal();
	}

	@Override
	public boolean updUserById(User u) {
		// TODO Auto-generated method stub
		return dao.updUserById(u);
	}

	@Override
	public int updRoomByType(String r_type, int r_price) {
		// TODO Auto-generated method stub
		return dao.updRoomByType(r_type,r_price);
	}

	@Override
	public List<String> queryRoomByType(String type) {
		// TODO Auto-generated method stub
		return dao.queryRoomByType(type);
	}

	@Override
	public int queryRoomByTypeToPrice(String type) {
		// TODO Auto-generated method stub
		return dao.queryRoomByTypeToPrice(type);
	}

	@Override
	public int queRoomByNumForId(String r_num) {
		// TODO Auto-generated method stub
		return dao.queRoomByNumForId(r_num);
	}

	@Override
	public boolean updRoomByNum(String r_num) {
		// TODO Auto-generated method stub
		return dao.updRoomByNum(r_num);
	}

	@Override
	public boolean addRoomOrder(Orders o) {
		// TODO Auto-generated method stub
		return dao.addRoomOrder(o);
	}

	@Override
	public List<OrderList> listAllOrder(String search, int offset, int limit) {
		// TODO Auto-generated method stub
		return dao.listAllOrder( search, offset,  limit);
	}

	@Override
	public int getOrderTotal() {
		// TODO Auto-generated method stub
		return dao.getOrderTotal();
	}

	@Override
	public boolean removeOrderById(int o_id) {
		// TODO Auto-generated method stub
		return dao.removeOrderById(o_id);
	}

	@Override
	public int removeAllOrder(List<String> list) {
		// TODO Auto-generated method stub
		return dao.removeAllOrder(list);
	}

	@Override
	public int queryRoomByNum(String r_num) {
		// TODO Auto-generated method stub
		return dao.queryRoomByNum(r_num);
	}

	@Override
	public boolean updOrder(int o_id, int r_id, String o_date, int o_days) {
		// TODO Auto-generated method stub
		return dao.updOrder(o_id, r_id,o_date, o_days);
	}

	@Override
	public List<Car> listAllCar() {
		// TODO Auto-generated method stub
		return dao.listAllCar();
	}

	@Override
	public int updCarOrder(List<String> c_idlist, String u_id) {
		// TODO Auto-generated method stub
		return dao.updCarOrder(c_idlist, u_id);
	}

	@Override
	public List<Orders> queryOrderByUid(String u_id) {
		// TODO Auto-generated method stub
		return dao.queryOrderByUid(u_id);
	}

	@Override
	public List<Car> listAllOrderCarBack(String search, int offset, int limit) {
		// TODO Auto-generated method stub
		return dao.listAllOrderCarBack( search, offset, limit);
	}

	@Override
	public int getOrderCarTotal() {
		// TODO Auto-generated method stub
		return dao.getOrderCarTotal();
	}

	@Override
	public List<Car> listAllCarBack(String search, int offset, int limit) {
		// TODO Auto-generated method stub
		return dao.listAllCarBack(search, offset, limit);
	}

	@Override
	public int getCarTotal() {
		// TODO Auto-generated method stub
		return dao.getCarTotal();
	}

	@Override
	public boolean removeCarById(int c_id) {
		// TODO Auto-generated method stub
		return dao.removeCarById(c_id);
	}

	@Override
	public int removeAllCar(List<String> list) {
		// TODO Auto-generated method stub
		return dao.removeAllCar(list);
	}

}
